package com.aoyy.dao;

import java.io.Serializable;
import java.util.Map;
import com.aoyy.util.Pagination;
/**=====================================================
 * <code>IBaseDao</code> interface for base DAO
 * @author Administrator
 * @date 2017-07-13
 * ===================================================== */
public interface IBaseDao<T> {
  void save(Object object);
  void saveOrUpdate(Object object);
  void update(Object object);
  void delete(Serializable... ids);
  T get(Serializable entityId);
  T load(Serializable entityId);
  
  Object uniqueResult(String hql, Object[] parameters);
  Integer getRecordCount();
  
  Pagination<T> query(Integer pageNo, Integer pageSize);
  Pagination<T> query(String where, Object[] parameters, Integer pageNo, Integer pageSize);
  Pagination<T> query(Map<String, String> orderby, Integer pageNo, Integer pageSize);
  Pagination<T> query(String where, Object[] parameters, Map<String, String> orderby, Integer pageNo, Integer pageSize);

}
